package com.ostrich.a2104gao5.test13

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/16 15:11
 * @Description : Test13
 */
fun main(){
    val dog = Dog()
    val cat = Cat()
    //is类型判断
    println(dog is Dog)
    println(cat is Cat)
    //类型转换
    eat(dog)
    //java中所有的类继承Object kotlin中Any

    cat.eat()
    dog.drink()
}

fun eat(animal: Animal){
    animal.show()

}